package com.lhn;

import com.lhn.config.SpringConfig;
import com.lhn.dao.BookDao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author lhn
 * @date 2024-08-21 13:56
 */

public class App17 {
    public static void main(String[] args) {
        ApplicationContext ctx = new AnnotationConfigApplicationContext(SpringConfig.class);
        BookDao bookDao = ctx.getBean(BookDao.class);
        System.out.println(bookDao);

        System.out.println(bookDao.getClass());
        //若通知类中的切入点能匹配到当前类中的方法class com.sun.proxy.$Proxy20
        //匹配不上为class com.lhn.dao.impl.BookDaoImpl
    }
}
